package com.study.springsecurity.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.springsecurity.pojo.entity.RoleInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleInfoMapper extends BaseMapper<RoleInfoEntity> {
    /**
     * 根据用户Id查询用户拥有的角色信息
     *
     * @param userId 用户id
     * @return
     */
    List<RoleInfoEntity> selectRoleByUserId(@Param("userId") Long userId);
}
